<div class="r0 p10 pt0 col-xs-12" ng-controller="detailCtrl">
    <form ng-submit="submitForm('user/source/addOrUpdate.do')">
        <table class="table table-bordered">
            <tr>
                <td class="tc w200">标题</td>
                <td class="tc"><input class="form-control" type="text" placeholder="文件名" required ng-model="model.name">
                </td>
            </tr>
            <tr>
                <td class="tc">模块</td>
                <td>
                    * 点击选择模块
                    <input class="form-control cursor" type="text" id="moduleName" required readonly
                           ng-model="model.moduleName"
                           ng-click="loadPickByName('iwidth=220|iheight=250|tagName=moduleName|tag=moduleId|code=MODULES|def='+model.moduleId+'|params=&key='+model.projectId,$event)">
                </td>
            </tr>
            <tr>
                <td class="tc w200">备注</td>
                <td class="tc">
                    <textarea rows="6" class="form-control" ng-model="model.remark"
                              placeholder="若为空，系统将自动提取文档中的内容"></textarea>
                </td>
            </tr>
            <tr>
                <td class="tc">排序</td>
                <td class="tc"><input class="form-control" min="0" max="10000"
                                      required type="number" ng-model="model.sequence"></td>
            </tr>
        </table>
        <button class="ndis" id="sourceForm" type="submit">提交</button>
    </form>

    <form enctype="multipart/form-data" name="fileForm" style="margin-top:-21px"
          target="hiddenFrame"
          action="file/upload.do?callBack=uploadFileCallBack" method="post">
        <table class="table table-bordered">
            <tr>
                <td class="tc w200">上传文件</td>
                <td>
                    <div class="input-group w">
                        <input class="form-control no-resize" ng-model="model.filePath"
                               placeholder="请点击“上传”按钮选择文件或输入文件路径">
                        <div class="input-group-addon cursor btn-purple C999" title="点击选择文件"
                             onclick="$('#filePath').click();">
                            <i class="iconfont main-color">&#xe619;</i> 选择文件
                        </div>
                    </div>
						<span class="ndis"> 
								<input type="file" name="img" onchange="uploadImage('filePath',-1,fileForm)"
                                       id="filePath"/>
						</span>
                </td>
            </tr>
        </table>
    </form>
</div>
<button class="btn btn-success fr" onclick="$('#sourceForm').click();">提交</button>
<div class="cb"></div>
<iframe name="hiddenFrame" class="ndis"></iframe>